<!-- 模块说明 -->
<template>
  <div>
    <div class="warpper">
      <div class="header">
        <img
          src="https://www.mindskip.net:9008/config/sdd/926d6405-b310-406d-bcf0-7718692f51c3/logo2.png"
          alt=""
        />
        <ul>
          <li v-for="(item, i) in routeStatic">
            <router-link
              :to="item.path"
              :class="i === num ? 'actice' : ''"
              @click="FnClick(i)"
              >{{ item.title }}</router-link
            >
          </li>
        </ul>
      </div>
      <div class="banner">
        <img
          src="https://www.mindskip.net:9008/config/sdd/6a1217f7-5770-4772-84f8-dd2a88babb8c/banner.png"
          alt=""
        />
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref, onMounted, computed } from "vue";
import { asyncRoutes } from "../../router";
const routeStatic = computed(() => {
  return asyncRoutes.filter((item: any) => !item.meta?.hidden);
});

const num = ref(0);
const FnClick = (index: number) => {
  num.value = index;
};
</script>
<style lang="scss" scoped>
.header {
  margin: 0 auto;
  // width: 100vw;
  height: 55px;
  display: flex;
  // justify-content: center;
  align-items: center;
  img {
    width: 200px;
    height: 55px;
  }
  ul {
    text-align: center;
    display: flex;
    margin-left: 100px;
    li {
      font-size: 16px;
      a {
        color: #000;
        padding: 0 15px 15px 15px;
      }
      .actice {
        color: #57aeff;
        border-bottom: 1px solid #57aeff;
      }
    }
  }
}
.banner {
  height: 400px;
  position: relative;
  img {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}
</style>
